package com.groupsix.controller;

import com.groupsix.pojo.SysCity;
import com.groupsix.service.SysCityService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class SysCityController {
    @Autowired
    private SysCityService sysCityService;
    @RequestMapping(value = "/getCity/{pid}")
    public List<SysCity> getCities(@PathVariable("pid") int pid){
        List<SysCity> cities = sysCityService.findCityById(pid);
        return cities;
    }
}
